fix: call ListTaskEntries only for directory URLs in PreheatFile/StaFile#4712
Merged
fix: call ListTaskEntries only for directory URLs in PreheatFile/StaFile#4712
Conversation
…File Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Gaius <gaius.qi@gmail.com>
hhhhsdxxxx
previously approved these changes
Apr 13, 2026
Signed-off-by: Gaius <gaius.qi@gmail.com>
06b6a38
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4712 +/- ##
==========================================
- Coverage 28.12% 28.07% -0.05%
==========================================
Files 232 232
Lines 23097 23096 -1
==========================================
- Hits 6495 6485 -10
- Misses 16161 16171 +10
+ Partials 441 440 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request refactors how directory URLs are handled in the
PreheatFileandStatFilemethods inscheduler/service/service_v2.go. The main focus is to streamline the initialization of theurlsslice and the logic for handling directory URLs, reducing redundant code and improving clarity.Refactoring directory URL handling:
urlsslice and the check for directory URLs (strings.HasSuffix(req.GetUrl(), "/")) to occur before callingListTaskEntriesin bothPreheatFileandStatFile, eliminating redundant code and improving readability. [1] [2]urlsslice and the directory check that previously occurred after fetching task entries, further simplifying the logic flow. [1] [2]Logging cleanup:
StatFilemethod, as this information is no longer necessary.Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist